/*
 ------------------------------------------------------------------------------
 Copyright (C) 2013 Eternal Games.

 This file is part of the GLQuake source code.

 The GLQuake source code is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or (at your
 option) any later version.

 The GLQuake source code is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 more details.

 You should have received a copy of the GNU General Public License along with
 the GLQuake source code; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 ------------------------------------------------------------------------------
*/


//
// gui.h - framework used by dynamic-link libraries
//


#ifndef __FRAMEWORK_GUI_H__
#define __FRAMEWORK_GUI_H__


/*
 ==============================================================================

 Graphical User Interface:

 The GUI system manages all user interaction with the game.

 A GUI, such as the main menu, defines its layout and scripted events through
 text files.

 Loading screens and heads-up displays also use GUI definitions.

 Composite GUIs can be rendered to textures and mapped onto surfaces in the
 world. Although the user can't interact with them directly, it is possible to
 interact with them through game entities.

 ==============================================================================
*/

typedef struct gui_t				gui_t;

// Functions exported by the engine
struct glqGUI_t {
	// Loads and registers the given GUI
	gui_t *					(*Register)(const char *name);

	// Activates the given GUI (all user input will be redirected to this GUI).
	// Passing NULL deactivates the current active GUI, if any.
	void					(*Activate)(gui_t *gui, int time);

	// Returns true if the given GUI is active
	bool					(*IsActive)(gui_t *gui);

	// Returns true if the given GUI covers the entire screen
	bool					(*IsFullscreen)(gui_t *gui);
};


#endif	__FRAMEWORK_GUI_H__